// +----------------------------------------------------------------------
// | Project:   Android-Commons  
// +----------------------------------------------------------------------
// | CreateTime: 15/12/14  下午3:53
// +----------------------------------------------------------------------
// | Author:     xab(xab@xabad.cn)
// +----------------------------------------------------------------------
// | Description:
// +----------------------------------------------------------------------
package cn.xabad.commons.converter;

/**
 * DESC   :
 * AUTHOR : Xabad
 */
public class RetrofitError {

    public static final int ERROR_NULL = 0;
    public static final int ERROR_CONNECTION = 1;
    public static final int ERROR_TIMEOUT = 2;
    public static final int ERROR_UNKNOW = 3;
    private int code;
    private String message;
    private String body;


    public RetrofitError() {
    }


    public RetrofitError(int code, String message, String body) {
        this.code = code; this.message = message; this.body = body;
    }


    public int getCode() {
        return code;
    }


    public void setCode(int code) {
        this.code = code;
    }


    public String getMessage() {
        return message;
    }


    public void setMessage(String message) {
        this.message = message;
    }


    public String getBody() {
        return body;
    }


    public void setBody(String body) {
        this.body = body;
    }


    @Override
    public String toString() {
        return "{" +
               "\"body\":\"" + body + '\"' +
               ", \"message\":\"" + message + '\"' +
               ", \"code\":" + code +
               '}';
    }
}
